@extends('layouts.art')
@section('content')

  <a class="btn btn-primary" href="{{route('blog.create')}}">添加文章</a>


	@foreach($articles as $article)
	<div class="panel panel-default">
	<div class="panel-body">
    {{$article->title}}
    <a href="{{route('blog.show',$article->id)}}" class="btn btn-info">阅读</a>
    <a href="{{route('blog.edit', $article->id)}}" class="btn btn-info">修改</a>

      <form action="{{ route('blog.destroy', $article->id) }}" method="post" style="display: inline-block;">
            {{ csrf_field() }}
            {{ method_field('DELETE') }}
            <button type="submit" class="btn btn-danger">删除</button>
        </form>
    </div>
    </div>
   @endforeach
  
  {!! $articles->render() !!}
 @endsection